package org.kl.bpm.entity.conf;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;
import javax.persistence.Transient;

import org.hibernate.validator.constraints.NotBlank;
import org.kl.bf.entity.AuditableEntity;
import org.kl.bf.entity.IdEntity;

/**
 * 
 * @Author hqm
 * @CreateTime 2014年5月25日 下午7:26:43
 * @ChangeLog 2015-10-30 QJ  添加assigneeType 指定接收人类型、assigneeValue 接收人值、formTitle 表单标题 
 */
@Entity
@Table(name = "BPM_CONF_FORM")
public class BpmConfForm extends AuditableEntity {
	private static final long serialVersionUID = 0L;
	private BpmConfNode bpmConfNode;

	@NotBlank(message = "表单不能为空")
	private String value;
	private Integer type;
	private String originValue;
	private Integer originType;
	private Integer status;
	private String assigneeType;// 指定接收人类型
	private String assigneeValue;// 接收人值
	private String formTitle;// 表单标题
	private String beforePostUrl;// 提交前过程 
	private String afterPostUrl;// 提交后过程
	private String backAssigneeType;// 提交前过程 
	private String backAssigneeValue;// 提交后过程

	private String formTemplateName;

	public BpmConfForm() {
	}

	public BpmConfForm(BpmConfNode bpmConfNode) {
		this.bpmConfNode = bpmConfNode;
	}

	public BpmConfForm(BpmConfNode bpmConfNode, String value, Integer type, String originValue, Integer originType, Integer status) {
		this.bpmConfNode = bpmConfNode;
		this.value = value;
		this.type = type;
		this.originValue = originValue;
		this.originType = originType;
		this.status = status;
	}

	/** @return null. */
	@ManyToOne
	@JoinColumn(name = "NODE_ID")
	public BpmConfNode getBpmConfNode() {
		return this.bpmConfNode;
	}

	/**
	 * @param bpmConfNode
	 *            null.
	 */
	public void setBpmConfNode(BpmConfNode bpmConfNode) {
		this.bpmConfNode = bpmConfNode;
	}

	/** @return null. */
	@Column(name = "VALUE", length = 200)
	public String getValue() {
		return this.value;
	}

	/**
	 * @param value
	 *            null.
	 */
	public void setValue(String value) {
		this.value = value;
	}

	/** @return null. */
	@Column(name = "TYPE")
	public Integer getType() {
		return this.type;
	}

	/**
	 * @param type
	 *            null.
	 */
	public void setType(Integer type) {
		this.type = type;
	}

	/** @return null. */
	@Column(name = "ORIGIN_VALUE", length = 200)
	public String getOriginValue() {
		return this.originValue;
	}

	/**
	 * @param originValue
	 *            null.
	 */
	public void setOriginValue(String originValue) {
		this.originValue = originValue;
	}

	/** @return null. */
	@Column(name = "ORIGIN_TYPE")
	public Integer getOriginType() {
		return this.originType;
	}

	/**
	 * @param originType
	 *            null.
	 */
	public void setOriginType(Integer originType) {
		this.originType = originType;
	}

	/** @return null. */
	@Column(name = "STATUS")
	public Integer getStatus() {
		return this.status;
	}

	/**
	 * @param status
	 *            null.
	 */
	public void setStatus(Integer status) {
		this.status = status;
	}

	@Transient
	public String getFormTemplateName() {
		return formTemplateName;
	}

	public void setFormTemplateName(String formTemplateName) {
		this.formTemplateName = formTemplateName;
	}

	public String getAssigneeType() {
		return assigneeType;
	}

	public void setAssigneeType(String assigneeType) {
		this.assigneeType = assigneeType;
	}

	public String getAssigneeValue() {
		return assigneeValue;
	}

	public void setAssigneeValue(String assigneeValue) {
		this.assigneeValue = assigneeValue;
	}

	public String getFormTitle() {
		return formTitle;
	}

	public void setFormTitle(String formTitle) {
		this.formTitle = formTitle;
	}

	public String getBeforePostUrl() {
		return beforePostUrl;
	}

	public void setBeforePostUrl(String beforePostUrl) {
		this.beforePostUrl = beforePostUrl;
	}

	public String getAfterPostUrl() {
		return afterPostUrl;
	}

	public void setAfterPostUrl(String afterPostUrl) {
		this.afterPostUrl = afterPostUrl;
	}

	public String getBackAssigneeType() {
		return backAssigneeType;
	}

	public void setBackAssigneeType(String backAssigneeType) {
		this.backAssigneeType = backAssigneeType;
	}

	public String getBackAssigneeValue() {
		return backAssigneeValue;
	}

	public void setBackAssigneeValue(String backAssigneeValue) {
		this.backAssigneeValue = backAssigneeValue;
	}
	
}
